<template>
  <div id="app" style="height: 100%;">
    <router-view></router-view>
  </div>
</template>

<script>
import { mapState, mapActions } from 'vuex'
import axios from 'axios'
	export default {
		name: 'app',
		created(){
			this.$store.commit("setToken", this.cook);
			console.log(this.token + '我是cookie里的openid')
			// var that = this;
			// axios.get(that.url+"/home/goods/getGoodsList")
   //          .then(function(res){
   //              console.log(res);
   //              that.list = res.data.goods;
   //              that.show2 = false;
   //              that.$store.commit("setToken", 'abc');
   //          })
   //          .catch(function(err){
   //              console.log(err);
   //          })
		},
		computed:{
            ...mapState({
                token: state => state.Token.userToken()//获取用户Token
            }),
        }
	}
</script>

<style lang="less">
@import '~vux/src/styles/reset.less';
@import '../static/public.css';

body {
  background-color: #fbf9fe;
}
</style>
